package homework021.dao;

import homework021.domain.Goods;

import java.io.IOException;
import java.util.List;

public interface GoodsDao {
    /**
     * 添加商品
     *
     * @param goods 商品信息
     * @return 添加成功/失败
     * @throws IOException 商品数据写入失败
     */
    public boolean add(Goods goods) throws IOException;

    public boolean deleteByIndex(int index) throws IOException;

    public boolean update(int index, Goods goods) throws IOException;

    public List<Goods> findAll() throws IOException;
}
